Class DiagnosticLog.DiagnosticLogBuilder

  • Enclosing class:
    DiagnosticLog

    public static class DiagnosticLog.DiagnosticLogBuilder
    extends Object
    Builder class for DiagnosticLog. This class follows the Builder design pattern, providing a way to construct a DiagnosticLog object step by step.
    • Constructor Detail

      • DiagnosticLogBuilder

        public DiagnosticLogBuilder​(String componentId,
                                    String actionId)
    • Method Detail

      • logId

        public DiagnosticLog.DiagnosticLogBuilder logId​(String logId)
        Sets the log ID of the DiagnosticLog.
        Parameters:
        logId - the log ID to be set.
        Returns:
        the current DiagnosticLogBuilder instance.
      • recordedAt

        public DiagnosticLog.DiagnosticLogBuilder recordedAt​(Instant recordedAt)
        Sets the recordedAt timestamp of the DiagnosticLog.
        Parameters:
        recordedAt - the timestamp to be set.
        Returns:
        the current DiagnosticLogBuilder instance.
      • requestId

        public DiagnosticLog.DiagnosticLogBuilder requestId​(String requestId)
        Sets the request ID of the DiagnosticLog.
        Parameters:
        requestId - the request ID to be set.
        Returns:
        the current DiagnosticLogBuilder instance.
      • flowId

        public DiagnosticLog.DiagnosticLogBuilder flowId​(String flowId)
        Sets the flow ID of the DiagnosticLog.
        Parameters:
        flowId - the flow ID to be set.
        Returns:
        the current DiagnosticLogBuilder instance.
      • resultMessage

        public DiagnosticLog.DiagnosticLogBuilder resultMessage​(String resultMessage)
        Sets the result message of the DiagnosticLog.
        Parameters:
        resultMessage - the action ID to be set.
        Returns:
        the current DiagnosticLogBuilder instance.
      • putParams

        public DiagnosticLog.DiagnosticLogBuilder putParams​(String key,
                                                            Object value)
        Adds a new key-value pair to the input map of the DiagnosticLog. If the input map has not been initialized yet, this method will initialize it.
        Parameters:
        key - the key to be added to the input map.
        value - the value to be associated with the key in the input map.
        Returns:
        the current DiagnosticLogBuilder instance.
      • putConfigurations

        public DiagnosticLog.DiagnosticLogBuilder putConfigurations​(String key,
                                                                    Object value)
        Adds a new key-value pair to the configurations map of the DiagnosticLog. If the configurations map has not been initialized yet, this method will initialize it.
        Parameters:
        key - the key to be added to the configurations map.
        value - the value to be associated with the key in the configurations map.
        Returns:
        the current DiagnosticLogBuilder instance.
      • addAllParams

        public DiagnosticLog.DiagnosticLogBuilder addAllParams​(Map<String,​?> input)
        Adds all entries from the provided map to the input map of the DiagnosticLog. If the input map has not been initialized yet, this method will initialize it.
        Parameters:
        input - the map containing entries to be added to the input map.
        Returns:
        the current DiagnosticLogBuilder instance.
      • addAllConfigurations

        public DiagnosticLog.DiagnosticLogBuilder addAllConfigurations​(Map<String,​?> configurations)
        Adds all entries from the provided map to the configurations map of the DiagnosticLog. If the configurations map has not been initialized yet, this method will initialize it.
        Parameters:
        configurations - the map containing entries to be added to the configurations map.
        Returns:
        the current DiagnosticLogBuilder instance.
      • build

        public DiagnosticLog build()
        Constructs a DiagnosticLog object using the set parameters.
        Returns:
        a new DiagnosticLog object.