Class TaskRun.Builder

  • Enclosing class:
    TaskRun

    public static class TaskRun.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • key

        public TaskRun.Builder key​(String key)
        The key of the object.
        Parameters:
        key - the value to set
        Returns:
        this builder
      • modelType

        public TaskRun.Builder modelType​(String modelType)
        The type of the object.
        Parameters:
        modelType - the value to set
        Returns:
        this builder
      • modelVersion

        public TaskRun.Builder modelVersion​(String modelVersion)
        The model version of an object.
        Parameters:
        modelVersion - the value to set
        Returns:
        this builder
      • name

        public TaskRun.Builder name​(String name)
        Free form text without any restriction on permitted characters.

        Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters.

        Parameters:
        name - the value to set
        Returns:
        this builder
      • description

        public TaskRun.Builder description​(String description)
        Detailed description for the object.
        Parameters:
        description - the value to set
        Returns:
        this builder
      • objectVersion

        public TaskRun.Builder objectVersion​(Integer objectVersion)
        The version of the object that is used to track changes in the object instance.
        Parameters:
        objectVersion - the value to set
        Returns:
        this builder
      • status

        public TaskRun.Builder status​(TaskRun.Status status)
        The status of the task run.
        Parameters:
        status - the value to set
        Returns:
        this builder
      • startTimeMillis

        public TaskRun.Builder startTimeMillis​(Long startTimeMillis)
        The start time.
        Parameters:
        startTimeMillis - the value to set
        Returns:
        this builder
      • endTimeMillis

        public TaskRun.Builder endTimeMillis​(Long endTimeMillis)
        The end time.
        Parameters:
        endTimeMillis - the value to set
        Returns:
        this builder
      • lastUpdated

        public TaskRun.Builder lastUpdated​(Long lastUpdated)
        The date and time the object was last updated.
        Parameters:
        lastUpdated - the value to set
        Returns:
        this builder
      • recordsWritten

        public TaskRun.Builder recordsWritten​(Long recordsWritten)
        The number of records processed in the task run.
        Parameters:
        recordsWritten - the value to set
        Returns:
        this builder
      • bytesProcessed

        public TaskRun.Builder bytesProcessed​(Long bytesProcessed)
        The number of bytes processed in the task run.
        Parameters:
        bytesProcessed - the value to set
        Returns:
        this builder
      • errorMessage

        public TaskRun.Builder errorMessage​(String errorMessage)
        Contains an error message if status is ERROR.
        Parameters:
        errorMessage - the value to set
        Returns:
        this builder
      • expectedDuration

        public TaskRun.Builder expectedDuration​(Double expectedDuration)
        The expected duration for the task run.
        Parameters:
        expectedDuration - the value to set
        Returns:
        this builder
      • expectedDurationUnit

        public TaskRun.Builder expectedDurationUnit​(TaskRun.ExpectedDurationUnit expectedDurationUnit)
        The expected duration unit of measure.
        Parameters:
        expectedDurationUnit - the value to set
        Returns:
        this builder
      • taskKey

        public TaskRun.Builder taskKey​(String taskKey)
        Task Key of the task for which TaskRun is being created.

        If not specified, the AggregatorKey in RegistryMetadata will be assumed to be the TaskKey

        Parameters:
        taskKey - the value to set
        Returns:
        this builder
      • externalId

        public TaskRun.Builder externalId​(String externalId)
        The external identifier for the task run.
        Parameters:
        externalId - the value to set
        Returns:
        this builder
      • retryAttempt

        public TaskRun.Builder retryAttempt​(Integer retryAttempt)
        Holds the particular attempt number.
        Parameters:
        retryAttempt - the value to set
        Returns:
        this builder
      • metrics

        public TaskRun.Builder metrics​(Map<String,​Float> metrics)
        A map of metrics for the run.
        Parameters:
        metrics - the value to set
        Returns:
        this builder
      • executionErrors

        public TaskRun.Builder executionErrors​(List<String> executionErrors)
        An array of execution errors from the run.
        Parameters:
        executionErrors - the value to set
        Returns:
        this builder
      • terminationErrors

        public TaskRun.Builder terminationErrors​(List<String> terminationErrors)
        An array of termination errors from the run.
        Parameters:
        terminationErrors - the value to set
        Returns:
        this builder
      • authMode

        public TaskRun.Builder authMode​(TaskRun.AuthMode authMode)
        The autorization mode for when the task was executed.
        Parameters:
        authMode - the value to set
        Returns:
        this builder
      • opcRequestId

        public TaskRun.Builder opcRequestId​(String opcRequestId)
        The OPC request ID of execution of the task run.
        Parameters:
        opcRequestId - the value to set
        Returns:
        this builder
      • objectStatus

        public TaskRun.Builder objectStatus​(Integer objectStatus)
        The status of an object that can be set to value 1 for shallow references across objects, other values reserved.
        Parameters:
        objectStatus - the value to set
        Returns:
        this builder
      • taskType

        public TaskRun.Builder taskType​(TaskRun.TaskType taskType)
        The type of task run.
        Parameters:
        taskType - the value to set
        Returns:
        this builder
      • isLogProcessingInProgress

        public TaskRun.Builder isLogProcessingInProgress​(Boolean isLogProcessingInProgress)
        This field tells the user if there is any logs being fetched in backend for failure.

        Applicable only for failed pipeline tasks.

        Parameters:
        isLogProcessingInProgress - the value to set
        Returns:
        this builder
      • identifier

        public TaskRun.Builder identifier​(String identifier)
        Value can only contain upper case letters, underscore and numbers.

        It should begin with upper case letter or underscore. The value can be modified.

        Parameters:
        identifier - the value to set
        Returns:
        this builder
      • keyMap

        public TaskRun.Builder keyMap​(Map<String,​String> keyMap)
        A key map.

        If provided, key is replaced with generated key. This structure provides mapping between user provided key and generated key.

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