Class Job.Builder

  • Enclosing class:
    Job

    public static class Job.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • key

        public Job.Builder key​(String key)
        Unique key of the job resource.
        Parameters:
        key - the value to set
        Returns:
        this builder
      • displayName

        public Job.Builder displayName​(String displayName)
        A user-friendly display name.

        Does not have to be unique, and it’s changeable. Avoid entering confidential information.

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

        public Job.Builder description​(String description)
        Detailed description of the job.
        Parameters:
        description - the value to set
        Returns:
        this builder
      • catalogId

        public Job.Builder catalogId​(String catalogId)
        The data catalog’s OCID.
        Parameters:
        catalogId - the value to set
        Returns:
        this builder
      • lifecycleState

        public Job.Builder lifecycleState​(JobLifecycleState lifecycleState)
        Lifecycle state for job.
        Parameters:
        lifecycleState - the value to set
        Returns:
        this builder
      • timeCreated

        public Job.Builder timeCreated​(Date timeCreated)
        The date and time the job was created, in the format defined by RFC3339.

        Example: 2019-03-25T21:10:29.600Z

        Parameters:
        timeCreated - the value to set
        Returns:
        this builder
      • timeUpdated

        public Job.Builder timeUpdated​(Date timeUpdated)
        Time that this job was last updated.

        An RFC3339 formatted datetime string.

        Parameters:
        timeUpdated - the value to set
        Returns:
        this builder
      • jobType

        public Job.Builder jobType​(JobType jobType)
        Type of the job.
        Parameters:
        jobType - the value to set
        Returns:
        this builder
      • scheduleCronExpression

        public Job.Builder scheduleCronExpression​(String scheduleCronExpression)
        Interval on which the job will be run.

        Value is specified as a cron-supported time specification “nickname”. The following subset of those is supported: @monthly, @weekly, @daily, @hourly. For metastore sync, an additional option @default is supported, which will schedule jobs at a more granular frequency.

        Parameters:
        scheduleCronExpression - the value to set
        Returns:
        this builder
      • timeScheduleBegin

        public Job.Builder timeScheduleBegin​(Date timeScheduleBegin)
        Date that the schedule should be operational.

        An RFC3339 formatted datetime string.

        Parameters:
        timeScheduleBegin - the value to set
        Returns:
        this builder
      • timeScheduleEnd

        public Job.Builder timeScheduleEnd​(Date timeScheduleEnd)
        Date that the schedule should end from being operational.

        An RFC3339 formatted datetime string.

        Parameters:
        timeScheduleEnd - the value to set
        Returns:
        this builder
      • scheduleType

        public Job.Builder scheduleType​(JobScheduleType scheduleType)
        Type of job schedule that is inferred from the scheduling properties.
        Parameters:
        scheduleType - the value to set
        Returns:
        this builder
      • connectionKey

        public Job.Builder connectionKey​(String connectionKey)
        The key of the connection used by the job.

        This connection will override the default connection specified in the associated job definition. All executions will use this connection.

        Parameters:
        connectionKey - the value to set
        Returns:
        this builder
      • jobDefinitionKey

        public Job.Builder jobDefinitionKey​(String jobDefinitionKey)
        The unique key of the job definition resource that defined the scope of this job.
        Parameters:
        jobDefinitionKey - the value to set
        Returns:
        this builder
      • internalVersion

        public Job.Builder internalVersion​(String internalVersion)
        Internal version of the job resource.
        Parameters:
        internalVersion - the value to set
        Returns:
        this builder
      • executionCount

        public Job.Builder executionCount​(Integer executionCount)
        The total number of executions for this job schedule.
        Parameters:
        executionCount - the value to set
        Returns:
        this builder
      • timeOfLatestExecution

        public Job.Builder timeOfLatestExecution​(Date timeOfLatestExecution)
        The date and time of the most recent execution for this Job, in the format defined by RFC3339.

        Example: 2019-03-25T21:10:29.600Z

        Parameters:
        timeOfLatestExecution - the value to set
        Returns:
        this builder
      • createdById

        public Job.Builder createdById​(String createdById)
        OCID of the user who created this job.
        Parameters:
        createdById - the value to set
        Returns:
        this builder
      • updatedById

        public Job.Builder updatedById​(String updatedById)
        OCID of the user who updated this job.
        Parameters:
        updatedById - the value to set
        Returns:
        this builder
      • jobDefinitionName

        public Job.Builder jobDefinitionName​(String jobDefinitionName)
        The display name of the job definition resource that defined the scope of this job.
        Parameters:
        jobDefinitionName - the value to set
        Returns:
        this builder
      • dataAssetKey

        public Job.Builder dataAssetKey​(String dataAssetKey)
        Unique key of the data asset to which this job applies, if the job involves a data asset.
        Parameters:
        dataAssetKey - the value to set
        Returns:
        this builder
      • glossaryKey

        public Job.Builder glossaryKey​(String glossaryKey)
        Unique key of the glossary to which this job applies.
        Parameters:
        glossaryKey - the value to set
        Returns:
        this builder
      • errorCode

        public Job.Builder errorCode​(String errorCode)
        Error code returned from the latest job execution for this job.

        Useful when the latest Job execution is in FAILED state.

        Parameters:
        errorCode - the value to set
        Returns:
        this builder
      • errorMessage

        public Job.Builder errorMessage​(String errorMessage)
        Error message returned from the latest job execution for this job.

        Useful when the latest Job Execution is in a FAILED state.

        Parameters:
        errorMessage - the value to set
        Returns:
        this builder
      • uri

        public Job.Builder uri​(String uri)
        URI to the job instance in the API.
        Parameters:
        uri - the value to set
        Returns:
        this builder
      • build

        public Job build()